■<HTML> <HEAD> <META HTTP-EQUIV="Content-Type" CONTENT="text/html;CHARSET=utf-8"> <META HTTP-EQUIV="Expires" CONTENT="0"> <META HTTP-EQUIV="MSThemeCompatible" CONTENT="Yes"> <HTA:APPLICATION ICON="page.ico"/> <TITLE>Select a Presentation</TITLE> <SCRIPT language="JavaScript"> <!-- var g_szUntitled = "Untitled" var g_szProjectAFilename = "projecta.js" var g_szProjectUFilename = "project.js" var g_szProducerGeneratedFile = "/* Producer-generated file */" var g_szDefaultFilename = "default.htm" --> </script> <SCRIPT language="JavaScript"> <!-- // // Copyright (c) 1992 - 2001 Microsoft Corporation. All Rights Reserved. // // META DATA Const var g_szEndOfHead = new RegExp("InitializeProject()","i") ; var g_szMetaTitle = new RegExp("var g_szLoadingTitle = \"(.*)\"","i") ; var g_szMetaAuthor = new RegExp("var g_szLoadingPresenter = \"(.*)\"","i") ; var g_szMetaDescription = new RegExp("var g_szLoadingDesc = \"(.*)\"","i") ; // Modify the string for search g_szProducerGeneratedFile = g_szProducerGeneratedFile.replace("/*", "") ; g_szProducerGeneratedFile = g_szProducerGeneratedFile.replace("*/", "") ; // Global Variables var fso ; var g_szCurProducerDocument = "" ; var g_szScriptFilename = "" ; var g_fIsUnicode = -1 ; //Check which script file to load, unicode or ansi. NT+ uses unicode var ua = window.navigator.userAgent g_szScriptFilename = g_szProjectUFilename ; //Check for compatible browser var g_fIsNS = (navigator.appName.toLowerCase() == "netscape"); var ua = window.navigator.userAgent var msie = ua.indexOf ( "MSIE " ) if ( msie <= 0 || (parseInt ( ua.substring ( msie+5, ua.indexOf ( ".", msie ) ) ) < 5 ) ) // is Microsoft Internet Explorer { if (window.confirm(g_szInvalidBrowser)) window.navigate(g_szIEURL); } /****************************************************************************** * Description: CheckTokenInLine : check for a specific META token and returns * the content * * Returns: * String : empty if token is not here, content of the token otherwise ******************************************************************************/ function CheckTokenInLine( szLine, szMetaName, szContent ) { if (szContent!="") return szContent ; szContent = szLine.match( szMetaName ) if (szContent) { szContent = RegExp.$1 ; if (szContent=="") { szContent = g_szUntitled ; } } else szContent = "" ; return szContent ; } /****************************************************************************** * Description: CheckForProducerPresentation check if the current file is * a producer presentation. If it is, add the information to the * HTML table * * Returns: * TRUE if the file is a producer presentation, FALSE otherwise ******************************************************************************/ function CheckForProducerPresentation( szFullFileName ) { var nBufferLength = 1024 ; var tfFile = fso.OpenTextFile( szFullFileName, 1, 0, g_fIsUnicode ) ; var szLine = new String("") ; var szTitle = new String("") ; var szAuthor = new String("") ; var szDescription = new String("") ; var szDuration = new String("") ; var fEndOfHead = 0 ; var fIsProducer = 0 ; while ((! tfFile.AtEndOfStream ) && (!fEndOfHead)) { szLine += tfFile.Read(nBufferLength) ; // Add to previous line as it could be a multiline field if (!fIsProducer) { fIsProducer = (szLine.search( g_szProducerGeneratedFile ) != -1) ? 1 : 0 ; } if (fIsProducer) { szDescription = CheckTokenInLine( szLine, g_szMetaDescription, szDescription ) ; szTitle = CheckTokenInLine( szLine, g_szMetaTitle, szTitle ) ; szAuthor = CheckTokenInLine( szLine, g_szMetaAuthor, szAuthor ) ; } fEndOfHead = (szLine.search(g_szEndOfHead) != -1); } if (fIsProducer) { var oRow, oCell ; g_szCurProducerDocument = fso.GetAbsolutePathName ( szFullFileName ) ; g_szCurProducerDocument = AddTrailingSlash( g_szCurProducerDocument ) ; g_szCurProducerDocument += g_szDefaultFilename ; oRow = PresentationTable.insertRow() ; oCell = oRow.insertCell() ; oCell.innerHTML = "<TR>" oCell.innerHTML += "<P class=\"PresentationTitle\"><A href=\"" + g_szCurProducerDocument + "\">" + szTitle + "</A><br>\r\n" ; oCell.innerHTML += "<P class=\"DescText\">" + szDescription + "</P>\r\n" oCell.innerHTML += "<HR size=2 color=\"#0099FF\" noshade class=\"TextHR\"\r\n>" oCell.innerHTML += "</TR>" } tfFile.Close() ; return fIsProducer ; } /****************************************************************************** * ScanDisk: Scan the folder passed in parameter and all subfolder for producer * presentation * * Returns: * the number of presentation found ******************************************************************************/ function ScanDisk(folderspec) { var f = fso.GetFolder(folderspec); var fc = new Enumerator(f.SubFolders); var nFileNbr = 0 ; // Scan folder first for (; !fc.atEnd(); fc.moveNext()) { nFileNbr += ScanDisk( fc.item() ) ; } // Scan files fc = new Enumerator(f.files) ; var szFileName = "" ; for (; !fc.atEnd(); fc.moveNext()) { szFileName = fso.GetFileName( fc.item() ) ; if ( szFileName.toLowerCase() == g_szScriptFilename.toLowerCase() ) { nFileNbr += CheckForProducerPresentation( fc.item() ) ; } } return nFileNbr ; } /****************************************************************************** * AddTrailingSlah: Add \ if necessary * * Returns: * the new file name ******************************************************************************/ function AddTrailingSlash( szFileName ) { var szFilePath = new String("") ; szFilePath = fso.GetAbsolutePathName( szFileName ) ; var szTempDriveLetter = fso.GetDriveName(szFilePath) + "\\" ; szFilePath = fso.GetParentFolderName( szFilePath ) ; if ( szFilePath != szTempDriveLetter ) { szFilePath += "\\" ; } return szFilePath ; } /****************************************************************************** * GetDriveLetter: Returns the drive letter of this document * * Returns: * The drive letter of this document ******************************************************************************/ function GetDriveLetter() { var szFilePath = new String("") ; var szFilePath = document.location.pathname ; szFilePath = unescape(szFilePath) ; szFilePath = AddTrailingSlash( szFilePath ) ; return szFilePath ; } /****************************************************************************** * Window_OnResize: Called when resizing the window * * Returns: * ******************************************************************************/ function Window_OnResize() { SetLeftSideColor_Height(); SetIndexText_Width(); } /****************************************************************************** * Window_OnScroll: Called when scrolling on the window * * Returns: * ******************************************************************************/ function Window_OnScroll() { SetLeftSideColor_Height(); } /****************************************************************************** * SetLeftSideColor_Height: * * Returns: * ******************************************************************************/ function SetLeftSideColor_Height() { if (document.body.clientHeight >= 1) { LeftSideColor.style.height = document.body.clientHeight + document.body.scrollTop; } } /****************************************************************************** * SetIndexText_Width: * * Returns: * ******************************************************************************/ function SetIndexText_Width() { if (document.body.clientWidth >= parseInt(LeftSideColor.currentStyle.width) ) { if (document.body.clientWidth <= 920) { IndexText.style.width = document.body.clientWidth - parseInt(LeftSideColor.currentStyle.width); } else { IndexText.style.width = 800; } } } /****************************************************************************** * GetDriveLetter: Initialize, display a list of producer presentation * * Returns: * nothing ******************************************************************************/ function DisplayPresentation() { SetLeftSideColor_Height(); SetIndexText_Width(); fso = new ActiveXObject("Scripting.FileSystemObject"); var nFileNbr = 0 ; var szDriveLetter = GetDriveLetter() ; nFileNbr = ScanDisk( szDriveLetter ) ; if ( nFileNbr == 1 ) { document.location.pathname = g_szCurProducerDocument ; window.close(); return; } WaitingPage.style.display ="none" ; IndexText.style.display = "" ; } --> </script> <STYLE> #LeftSideColor { POSITION: absolute; BACKGROUND-COLOR: #0099FF; TOP: 0px; LEFT: 0px; WIDTH: 100px; FLOAT: left; } #IndexText { POSITION: absolute; BACKGROUND-COLOR: #FFFFFF; TOP: 0px; LEFT: 100px; PADDING: 20px; } .PresentationTitle { FONT-FAMILY: Verdana, sans-serif; FONT-SIZE: 18px; FONT-WEIGHT: bold; COLOR: #000000; CURSOR: hand; } .PresenterSubtitle { FONT-FAMILY: Verdana, sans-serif; FONT-SIZE: 16px; FONT-WEIGHT: bold; COLOR: #000000; CURSOR: hand; } .DescText { FONT-FAMILY: Verdana, sans-serif; FONT-SIZE: 12px; COLOR: #000000; CURSOR: hand; } </STYLE></HEAD> <BODY onload="DisplayPresentation()" onscroll="SetLeftSideColor_Height()" onresize="Window_OnResize()"> <DIV ID="LeftSideColor"> </DIV> <!-- ---------------- WAIT SECTION --------------------------------- --> <div class="WaitingPage" id="WaitingPage" height: 100%; width: 100%;"> <P align=center><STRONG><FONT size=5>Searching for available Microsoft Producer presentations. Please wait...</FONT></STRONG></P> </div> <!-- ---------------- RESULT SECTION ------------------------------ --> <div class="IndexText" id="IndexText" height: 100%; width: 100%; style="DISPLAY: none"> <TABLE ID="PresentationTable" width="100%"> </TABLE></div> </BODY> </HTML>